package com.serie402.common.delegate;

import com.kiss.fw.delegate.AbstractDelegate;
import com.kiss.fw.exceptions.BusinessException;
import com.serie402.common.dto.CouponDTO;
import com.serie402.common.dto.SpecialDTO;

public class ShoppingDelegate extends AbstractDelegate {
	public static class SpecialsDelegate extends AbstractDelegate {
		private SpecialsDelegate() {
		}
		
		/**
		 * Creates the special specified.
		 * 
		 * @param SpecialDTO _dto
		 * @throws BusinessException
		 */
		public static void create(SpecialDTO _dto) throws BusinessException {
			executeCommand("CreateSpecial", _dto);
		}
		
		/**
		 * Retrieves the special specified.
		 * 
		 * @param SpecialDTO _dto
		 * @throws BusinessException
		 */
		public static void read(SpecialDTO _dto) throws BusinessException {
			executeCommand("ReadSpecial", _dto);
		}
		
		/**
		 * Updates the special specified.
		 * 
		 * @param SpecialDTO _dto
		 * @throws BusinessException
		 */
		public static void update(SpecialDTO _dto) throws BusinessException {
			executeCommand("UpdateSpecial", _dto);
		}
		
		/**
		 * Deletes the special specified.
		 * 
		 * @param SpecialDTO _dto
		 * @throws BusinessException
		 */
		public static void delete(SpecialDTO _dto) throws BusinessException {
			executeCommand("DeleteSpecial", _dto);
		}
		
		/**
		 * Searches for the specified special.
		 * 
		 * @param SpecialDTO _dto
		 * @throws BusinessException
		 */
		public static void search(SpecialDTO _dto) throws BusinessException {
			executeCommand("SearchSpecials", _dto);
		}
	}
	
	public static class CouponsDelegate extends AbstractDelegate {
		private CouponsDelegate() {
		}
		
		/**
		 * Creates the coupon specified.
		 * 
		 * @param CouponDTO _dto
		 * @throws BusinessException
		 */
		public static void create(CouponDTO _dto) throws BusinessException {
			executeCommand("CreateCoupon", _dto);
		}
		
		/**
		 * Retrieves the coupon specified.
		 * 
		 * @param CouponDTO _dto
		 * @throws BusinessException
		 */
		public static void read(CouponDTO _dto) throws BusinessException {
			executeCommand("ReadCoupon", _dto);
		}
		
		/**
		 * Updates the coupon specified.
		 * 
		 * @param CouponDTO _dto
		 * @throws BusinessException
		 */
		public static void update(CouponDTO _dto) throws BusinessException {
			executeCommand("UpdateCoupon", _dto);
		}
		
		/**
		 * Deletes the coupon specified.
		 * 
		 * @param CouponDTO _dto
		 * @throws BusinessException
		 */
		public static void delete(CouponDTO _dto) throws BusinessException {
			executeCommand("DeleteCoupon", _dto);
		}
		
		/**
		 * Searches for the specified coupon.
		 * 
		 * @param CouponDTO _dto
		 * @throws BusinessException
		 */
		public static void search(CouponDTO _dto) throws BusinessException {
			executeCommand("SearchCoupons", _dto);
		}
	}
	
	private ShoppingDelegate() {
	}
}